package edu.xhu.biliuser.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.xhu.model.biliuser.pojos.BiliUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface BiliUserMapper extends BaseMapper<BiliUser> {
    /**
     * 根据用户ids查询用户的全部信息
     * 输出示例：{play=4, mega=1, user_name=bili_9d7405a788644a328b8507c4de946cc0,..., sign=奉天靖难，吃烧烤, likes=9, created_time=2024-04-26 17:24:01.0}
     *
     * @param userIds 一组用户id
     * @return 一组用户的全部信息
     */
    List<Map<String, Object>> queryAllUserInfoByIds(List<Long> userIds);

    /**
     * 根据用户id查询用户的全部信息
     * @param userIds
     * @return
     */
    Map<String, Object> queryUserInfoById(Long userIds);


    /**
     * 获取全部用户id
     *
     * @return
     */
    @Select("SELECT user_id FROM bili_user")
    List<Long> getAllUserIds();
}
